package com.happy.study.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.happy.study.entity.SubjectEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: Wuzh
 * @Description:
 * @Date Created in 17:10 2021/1/31
 * @return
 */
@Mapper
public interface SubjectMapper extends BaseMapper<SubjectEntity> {


    @Select ( value = "select si.subjectId,si.subjectContent,si.paperId,si.categoryId, ci.categoryName AS categoryName,si.optionId,si.createTime,si.changeTime,si.isUsed from subject_info si left join category_info ci on ci.id = si.categoryId where si.paperId=#{paperId}")
    List<SubjectEntity> queryList ( int paperId );

}
